dojo.provide("dojot.util.MemoryPageList");
dojo.experimental("dojot.util.MemoryPageList");

dojo.require("dojot.util.PageInfo");
dojo.require("dojot.util.PageList");
dojo.declare("dojot.util.MemoryPageList",dojot.util.PageList,{
	constructor: function(req){	
		//一个数据类，这个类为了去调用服务获取数据用,如果req里面包括items说明是内存分页,否则是动态拿到分页
		this.pageInfo = new dojot.util.PageInfo(req);
		this._setPage();	
	},
	cleanPageInfo: function(){
		this.pageInfo.currentPage = 1;
	},
	_setPage:function(){
		this.initTurnPageInfo();
		this.items = this.pageInfo.getCurrentItems();
		
	},
	_setCurrentPage:function(currentPage){
		this.pageInfo.setCurrentPage(currentPage);
	},
	showIndex: function(currentPage){
		this.pageInfo.setCurrentPage(currentPage);
		this._setPage();
	},
	_getListPageStart: function(){
		 return this.pageInfo.getListPageStart();
	},
	_getListPageEnd: function(){
		return this.pageInfo.getListPageEnd();
	}
})